{% extends 'BASE/base.html' %}
{% block css %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/Index/index.css' %}"/>
<script src="{% static 'js/Index/index.js' %}" type="text/javascript" charset="utf-8"></script>
{% endblock %}
{% block title %} 搜索结果-书漫网O(∩_∩)O哈哈~ {% endblock %}
{% block main %}
<div class="container">
    <div class="row mt-3">
        "{{keyword}}"的搜索结果总数为:"{{sum_result}}"
    </div>
    <div class="row mt-3">
        {% if comics_search_result or novels_search_result %}
        {% for comic in comics_search_result %}
        <div class="col-4">
            <a href="{% url 'Comics:cover' comic.cId %}">
                <figure class="figure">
                    <img src="{{comic.cCover}}" class="figure-img img-fluid rounded" alt="{{comic.fName}}">
                    <figcaption class="figure-caption text-center">
                        {{comic.cName}}
                    </figcaption>
                </figure>
            </a>
        </div>
        {% endfor %}
        {% for novel in novels_search_result %}
        <div class="col-4">
            <a href="{% url 'Novels:novels_cover' novel.fId %}">
                <figure class="figure">
                    <img src="{{novel.fCover}}" class="figure-img img-fluid rounded" alt="{{novel.fName}}">
                    <figcaption class="figure-caption text-center">
                        {{novel.fName}}
                    </figcaption>
                </figure>
            </a>
        </div>
        {% endfor %}
        {% else %}
        抱歉,找不到关于"{{keyword}}"的结果QAQ
        {% endif %}
    </div>
</div>
{% endblock %}
